<%@ page language="java" import="java.util.*,com.hs.core.utils.*,com.hs.core.cache.*,com.hs.chd.action.search.*" pageEncoding="utf-8"%>
<%
 
String paramvalue = (String)request.getAttribute("paramvalue"); 
String dname = (String)request.getAttribute("dname"); 
String xuewei = (String)request.getAttribute("xuewei"); 
String zhichengfj = (String)request.getAttribute("zhichengfj"); 
String xingyins = (String)request.getAttribute("xingyins"); 
String disname = (String)request.getAttribute("disname"); 
String geiyaofs = (String)request.getAttribute("geiyaofs"); 
String herbname = (String)request.getAttribute("herbname"); 

DictCacheUtil cache = DictCacheUtil.getInst();
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head> 
<%@ include file="../../include.jsp"%> 
<script src='<%=basePath%>thirtpart/jquery/jquery.blockUI.js'></script> 
<script src='<%=basePath%>app/js/search.js'></script> 
<script src="<%=basePath %>app/js/nav.js"></script> 
<script src="<%=basePath %>common/artDialog/artDialog.js?skin=blue"></script> 
<script type="text/javascript" src="<%=basePath %>common/artDialog/plugins/iframeTools.js"></script>
<style>.tac{text-align:center}</style>
<script language=JavaScript> 
function datastat(){
	//var win = document.getElementById('resultlist').contentWindow;
	//var allsql = win.document.getElementById('allfullsql').value;
    //openwindow('<%=basePath%>stat/statindex.do?allsql='+encodeURI(allsql),'1280','960','');
	basiclinchuang('','','<%=basePath %>');
}
function datastatadv(){
	//var win = document.getElementById('resultlist').contentWindow;
	//var allsql = win.document.getElementById('allfullsql').value;
    //openwindow('<%=basePath%>stat/statindex.do?allsql='+encodeURI(allsql),'1280','960','');
	advlinchuang('','<%=basePath %>');
}
function returnIndex(){
  window.parent.cont.frameElement.src="<%=basePath%>search/index.do";  
}
function resetAllInput(){
     
 	var   obj   =   document.all.tags("input"); 
	for(i=0;i <obj.length;i++){ 
	    if(obj[i].type== "text"){ 
	            obj[i].value   =   ""; 
	    } 
	}
}
function simpleCaseSearch(condition){ 
	simpleSearch(condition,'<%=basePath%>');
}
function comflexCaseSearch(condition){ 
	comflexSearch(condition,'<%=basePath%>');
}
function loadDistree(){
    art.dialog.open('<%=basePath%>search/distree.do', { height: '60%', width: '700px', title: "按疾病分类", lock: true }, false);//打开子窗体
}
function setSearchType(searchtype){
    
    document.getElementById("searchtype").value = searchtype;
    
    
}
</script>
</head>
<body>
<!--头部-->
<div class="header">
	<div class="logo"></div>
    <div class="banner"></div>
    <ul class="tool">
    	<li><a href="javaScript:func4nav('8','<%=basePath %>');" class="index">首页</a></li>
    	<!-- li><a href="#" class="login">登录</a></li-->
        <li><a href="#" class="register">注册</a></li>
                <li><a href="javaScript:logout('<%=basePath %>');" class="help">退出</a></li>
        
    </ul>
</div>
<!--/头部-->
<!--导航-->
<ul class="nav"> 
     <li   class="active"><a href="javaScript:func4nav('1','<%=basePath %>');" class="nav-1">数据检索</a></li>     
	<li><a href="javaScript:func4nav('7','<%=basePath %>');" class="nav-7">按疾病统计</a></li>        
	<li><a href="javaScript:func4nav('4','<%=basePath %>');" class="nav-4">按单味药统计</a></li>   
    <li><a href="javaScript:func4nav('5','<%=basePath %>');" class="nav-5">按穴位统计</a></li>      
    <li><a href="javaScript:func4nav('6','<%=basePath %>');" class="nav-6">按给药方式统计</a></li>        
    <li><a href="javaScript:func4nav('2','<%=basePath %>');" class="nav-2">按职称分级统计</a></li>
    <li><a href="javaScript:func4nav('3','<%=basePath %>');" class="nav-3">按行医年数统计</a></li>
</ul>
<!--/导航-->
<div class="content">
	<!--检索页签-->
	<dl class="tab">
    	<dt>
        	<span class="active" onclick="setSearchType('1');">基本检索</span>
            <span onclick="setSearchType('2');"> 高级检索 </span>
        </dt>
        <dd class="tac">
            
        	<input type="text" placeholder="请输入检索条件" name="q" id="q" value="<%=herbname==null?"":herbname%><%=dname==null?"":dname%><%=xuewei==null?"":xuewei%><%=disname==null?"":disname%><%=zhichengfj==null?"":cache.getConstantNameByCode(zhichengfj, "zhichengfj")%><%=xingyins==null?"":cache.getConstantNameByCode(xingyins, "xingyins")%><%=geiyaofs==null?"":geiyaofs%>" style="width:450px;"/>
        	<%if(zhichengfj != null ){ %>
        	   <input type="hidden" value="zhichengfj" name="qtype" id="qtype"/>
        	<%} %>
        	<%if(xingyins != null ){ %>
        	   <input type="hidden" value="xingyins" name="qtype" id="qtype"/>
        	<%} %>
        	<%if(geiyaofs != null ){ %>
        	   <input type="hidden" value="geiyaofs" name="qtype" id="qtype"/>
        	<%} %>
            <input type="button" class="btn btn-primary" value="检索" onclick="simpleCaseSearch('');"/>
        </dd>
        <dd>
        	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="sear">
              <tr>
                <th width="15%">医生姓名</th>
                <td width="15%"><input type="text" id="dname" name="dname" value=""/></td>
                <th width="15%">证候</th>
                <td width="15%"><input type="text" id="zhenghou" name="zhenghou" value=""/></td>
                <th width="15%">症状</th>
                <td><input type="text" id="zhengzhuang" name="zhengzhuang" value=""/></td>
              </tr>
              <tr>
                <th>药方名称</th>
                <td><input type="text" id="yaofangmc" name="yaofangmc" value=""/></td>
                <th>穴位</th>
                <td><input type="text" id="xueweimc" name="xueweimc" value=""/></td>
                <th>单味药名称</th>
                <td><input type="text" id="herbname" name="herbname" value=""/></td>
              </tr>
              <tr>
                <th>名老中医等级</th>
                <td colspan="2" style="width:60%">
                	<label><input type="checkbox" name="clevel" id="clevel" value="1"/> 国家级</label>
                    <label><input type="checkbox" name="plevel" id="plevel" value="1"/> 省级</label> 
                    <label><input type="checkbox" name="flevel" id="flevel" value="1"/> 县级</label>
                </td>
                <th>治疗方式</th>
                <td colspan="2">
                	<label><input type="checkbox" name="iszy" id="iszy" value="1"/> 中医</label>
                    <label><input type="checkbox" name="isxy" id="isxy" value="1"/> 西医</label> 
                    <label><input type="checkbox" name="isam" id="isam" value="1"/> 按摩</label> 
                    <label><input type="checkbox" name="iszj" id="iszj" value="1"/> 针灸</label> 
                </td>
              </tr>
              <tr>
                <th>疾病名称</th>
                <td colspan="5"><input type="text" value="" name="disname" id="disname" style="width:670px;"/>&nbsp;&nbsp;
                <a href="javaScript:loadDistree();">选择</a>&nbsp;&nbsp; </td>
              </tr>
               <tr>
                <th>输入示例:</th>
                <td colspan="5">糖尿病,心脏病,高血压</td>
              </tr>
              <tr>
                <th>标题</th>
                <td colspan="2"><input type="text" value="" name="wenti" id="wenti" style="width:265px;"/></td>
                <th>作者</th>
                <td colspan="2"><input type="text" value="" name="author" id="author" style="width:250px;"/></td>
              </tr>
              <tr> 
              </tr>
              <tr>
                <td colspan="6" class="tar" style="padding-right:38px;"><input type="button" class="btn btn-primary" value="检索" onclick="comflexCaseSearch('');"/>&nbsp;&nbsp;<input type="button" class="btn btn-primary" value="清空" onclick="resetAllInput();"/>&nbsp;&nbsp;</td>
              </tr>
          </table>
          
        </dd>
    </dl>
    <!--/检索页签-->
    <!--分类页签-->
    <dl class="class-tab">
    	<dt>
    	    <input type="hidden" name="searchtype" value="1" id="searchtype" />
        	<span class="active" onclick="groupSearchresult('1','<%=basePath%>');">文章发表年份</span>
            <span onclick="groupSearchresult('2','<%=basePath%>');">患者年龄</span>
            <span onclick="groupSearchresult('3','<%=basePath%>');">职称分级</span>
            <span onclick="groupSearchresult('4','<%=basePath%>');">行医年数</span>
            <span onclick="groupSearchresult('5','<%=basePath%>');">名老中医等级</span> 
        </dt>
        <dd>
            <div id="loadingimg" align=center style="display:block"><img src="<%=basePath%>loading.gif"></img></div>
        	<span id="grouparea"></span>
        </dd> 
    </dl>
    <!--/分类页签-->
    <iframe src="<%=basePath %>search/simplecasesearch.do" id="caselist" frameborder="0" class="result"></iframe>
</div>
<!--版权-->
<div class="footer"><spring:message code="sys.copyright" /></div>
<!--/版权-->
</body>
</html>
<script>
 <%if(dname != null || xuewei != null || zhichengfj != null || xingyins != null || disname != null || geiyaofs!= null || herbname != null){%>
    simpleCaseSearch('');
 <%}else{%>
	searchResultGroupbyYear('','<%=basePath%>'); 
 <%}%>
</script>
